package com.xx.bysj.controller;

import com.xx.bysj.service.EmailService;
import com.xx.bysj.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/email")
public class SendEmailController {

    @Autowired
    private EmailService emailService;

    @RequestMapping("/sendEmail")
    @ResponseBody
    public Result sendEmail(@RequestParam String email){
        return emailService.sendEmail(email);
    }


}
